<template>
  我是父组件
  <hr>
  <test ref="test1" :title="list" @handleClick="handleClick"></test>
  {{ list2.list }}
  <hr>
  <button @click="getRef">获取ref</button>
</template>

<script setup lang="ts">
import test from './index.vue'
import { reactive, ref } from 'vue';

const list = reactive<number[]>([1,2,3,4,5])

type list = {
  list:number[]
}
const list2 = reactive<list>({
  list:[]
})

const test1 = ref(null)

const getRef = () => {
  console.log(test1.value);
}

const handleClick = (list : number[]) => { 
  // list2.push(...list)
  list2.list = list
}

</script>

<style lang='scss' scoped>

</style>
